﻿using System.ServiceProcess;

namespace IMDBApi.Implementation
{
    /// <summary>
    /// ...
    /// </summary>
    public partial class Service : ServiceBase
    {

        /// <summary>
        /// ...
        /// </summary>
        PollingService service = new PollingService(Configurations.MOVIE_LIB);

        /// <summary>
        /// ...
        /// </summary>
        public Service()
        {
            InitializeComponent();
        }

        /// <summary>
        /// ...
        /// </summary>
        protected override void OnStart(string[] args)
        {
            service.Start();
        }

        /// <summary>
        /// ...
        /// </summary>
        protected override void OnStop()
        {
            service.Stop();
            service = null;
        }
    }
}
